<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.box{
				 width:96px;
				height:80px;
				background: url(angel.gif);
				background-size: 100% 100%;
				position: relative;
			}
		</style>
	</head>
	<body>
		<div class="box"></div>
	<script>
		
		var box=document.querySelector('.box');
	 //    document.onclick=function(e){
		// 	console.log(e.pageX,e.pageY);
		// }
	 //    document.onmousemove=function(e){
		// 	console.log(e.pageX,e.pageY);
		// }
		
		
		document.addEventListener('mousemove',function(e){
			box.style.left=e.pageX-box.offsetWidth/2 +"px";
			box.style.top=e.pageY-box.offsetHeight/2 +"px";
		})
		// document.addEventListener('click',function(e){
		// 	box.style.left=e.pageX-box.offsetWidth/2 +"px";
		// 	box.style.top=e.pageY-box.offsetHeight/2 +"px";
		// })
	</script>	
	</body>
</html>
